home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / CompoundBorderBeanInfo.java < prev    next >
Text File  |  1998-10-21  |  2KB  |  60 lines

  1. package com.symantec.itools.swing.borders;
  2.  
  3. import java.beans.*;
  4. import com.symantec.itools.vcafe.beans.PropertyDescriptorAttributes;
  5. import com.symantec.itools.vcafe.beans.PropertyHelpIDs;
  6.  
  7. public final class CompoundBorderBeanInfo
  8.     extends BorderBeanInfo
  9. {
  10.     public CompoundBorderBeanInfo()
  11.     {
  12.         super();
  13.         
  14.         set16x16ColorIconName("CompoundBorder.gif");
  15.     }
  16.     
  17.     protected Class getBeanClass()
  18.     {
  19.         return CompoundBorder.class;
  20.     }
  21.     
  22.     public PropertyDescriptor[] getPropertyDescriptors()
  23.     {
  24.         try
  25.         {
  26.             Class beanClass = getBeanClass();
  27.             
  28.             PropertyDescriptor insideBorderPD = new PropertyDescriptor("insideBorder", beanClass);
  29.             insideBorderPD.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_DEFAULT_IS_NONE_ATTRIBUTE,Boolean.TRUE);
  30.             insideBorderPD.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.COMPOUNDBORDER_INSIDE_BORDER_HELP_ID));
  31.             
  32.             PropertyDescriptor outsideBorderPD = new PropertyDescriptor("outsideBorder", beanClass);
  33.             outsideBorderPD.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_DEFAULT_IS_NONE_ATTRIBUTE,Boolean.TRUE);
  34.             outsideBorderPD.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.COMPOUNDBORDER_OUTSIDE_BORDER_HELP_ID));
  35.             
  36.             return new PropertyDescriptor[]
  37.                 {
  38.                     insideBorderPD,
  39.                     outsideBorderPD,
  40.                 };
  41.         }
  42.         catch(IntrospectionException e)
  43.         {
  44.             e.printStackTrace();
  45.         }
  46.         
  47.         //Error, return no properties
  48.         return new PropertyDescriptor[0];
  49.     }
  50.  
  51.     protected void modifyBeanDescriptor(BeanDescriptor beanDescriptor)
  52.     {
  53.         super.modifyBeanDescriptor(beanDescriptor);
  54.         
  55.         beanDescriptor.setValue("WINHELP", winHelpID);
  56.     }
  57.     
  58.     protected final static String winHelpID = "0x60134";
  59. }
  60.